package com.nightsoul.springboottest2.schedule.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduleTask1 {
	private static final Logger LOGGER = LoggerFactory.getLogger(ScheduleTask1.class);
	private int count;
	
	@Scheduled(cron="*/6 * * * * ?")
	private void execute() {
		LOGGER.info("ScheduleTask1 executed: " + (++count));
	}
	
}
